package com.aisile.article.controller.v1;

import com.aisile.apis.article.ApArticleConfigControllerApi;
import com.aisile.article.service.ApArticleConfigService;
import com.aisile.model.article.pojos.ApArticleConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.POST;

/**
 * @Auther:yry
 * @Date:2024/1/10 0010
 * @VERSON:1.0
 */
@RestController
@RequestMapping("/api/v1/article_config")
public class ApArticleConfigController implements ApArticleConfigControllerApi {

    @Autowired
    private ApArticleConfigService apArticleConfigService;


    @PostMapping("/save")
    @Override
    public ApArticleConfig saveApArticleConfig(@RequestBody ApArticleConfig apArticleConfig) {
        apArticleConfigService.save(apArticleConfig);
        return apArticleConfig;
    }
}
